package com.ytkj.digitalConstruction.enums.ding;

public enum DingOperationEnum {
	/**  添加 */
	CREATE("create"),
	
	/** 修改 */
	UPDATE("update"),
	
	/** 删除 */
	DELETE("delete");

	/** 枚举项的值 */
	String value;
	
	DingOperationEnum(String value){
		this.value = value;
	}
	
	/**
	 * 获取枚举类型对用的值
	 * @return 枚举项对应的值
	 */
	public String getValue(){
		return value;
	}
	
	public DingOperationEnum getByValue(String value){
		for(DingOperationEnum status : DingOperationEnum.values()){
			
			if(status.value == value){
				return status;
			}
		}
		throw new IllegalArgumentException("No element matches " + value);  
	}
}
